package com.uab.ia.entidades;

import java.util.ArrayList;

public class Node {

	public long id;
	private double costA;
	private double costG;
	private long parentId = -1;
	private Node parent =  null;
	
	private int transA;
	private int transG;
	
	private int ParadasA;
	private int ParadasG;
	
	public int gettransA() {
		return transA;
	}
	
	public int gettransG() {
		return transG;
	}
	
	public int gettransT() {
		return transG+transA;
	}
	
	public void settransA(int costG) {
		this.transA = costG;
	}

	public void settransG(int costG) {
		this.transG = costG;
	}

	
	public Node(long id) {
		this.id = id;
		this.setCostA(0.0);
		this.setCostG(0.0);
		this.transA = 0;
		this.transG = 0;
	}
	
	public double getCosteT()
	{
		return getCostA() + getCostG();
	}
	
	
	
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();

		sb.append("Estacion Padre: ");
		sb.append(parentId);
		sb.append(" - Estacion: ");
		sb.append(id);
		
		return sb.toString();
	}

	public double getCostA() {
		return costA;
	}

	public void setCostA(double costA) {
		this.costA = costA;
	}

	public double getCostG() {
		return costG;
	}

	public void setCostG(double costG) {
		this.costG = costG;
	}

	public long getParentId() {
		return parentId;
	}

	public void setParentId(long parentId) {
		this.parentId = parentId;
	}

	public Node getParent() {
		return parent;
	}

	public void setParent(Node parent) {
		this.parent = parent;
	}

	public int getParadasG() {
		return ParadasG;
	}

	public void setParadasG(int paradasG) {
		ParadasG = paradasG;
	}

	public int getParadasA() {
		return ParadasA;
	}

	public void setParadasA(int paradasA) {
		ParadasA = paradasA;
	}
	
	public int getParadasT() {
		return ParadasA+ParadasG;
	}
}
